<?php 
require_once("include/conn.php");
require_once("include/config.php");

$table="bl_scrk";
if(!empty($ttdate))
{
$ttdate=$_GET[ttdate];
//$ttdate="2007-10";

$cdate=substr($ttdate,0,4);
$ccdate=substr($ttdate,4,2);

$mmdate=$ccdate+0;
$ppdate=$cdate.$ccdate;
$mmyear=$cdate;
$mmmonth=$ccdate;    
$sql="SELECT * FROM $tb_rk WHERE date_format( tdate, '%Y%m' ) = '".$ppdate."' ORDER BY tdate";
$cn=mysql_db_query($db_name,$sql);


$cname=$mmdate."月所有日况信息";

}
else
{
$mmyear=date("Y");
$mmmonth=date("m");
$mmdate=$mmmonth+0;
$ppdate=$mmyear.$mmmonth;    
$sql="SELECT * FROM $tb_rk WHERE date_format( tdate, '%Y%m' ) = '".$ppdate."' ORDER BY tdate";
$cn=mysql_db_query($db_name,$sql);


$cname=$mmdate."月所有日况信息";
}


$cnone="动态信息";
$cntwo="全年日况";
$none="4";
$ntwo="3";


$sql_qian1="select * from $tb_dt ORDER BY tdate DESC limit 5 ";
$cn_qian1=mysql_db_query($db_name,$sql_qian1);
 
/*  $sql_qian2="select * from $tb_rk ORDER BY tdate DESC limit 5 ";
$cn_qian2=mysql_db_query($db_name,$sql_qian2);
 */




?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php echo $webname."--".$cname; ?></title>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<?php include("include/jsload.php");	?>
<link href="images/bj.css" rel="stylesheet" type="text/css">
</head >

<body <?php include("include/load.php");	?>>
 <?php		 include("include/top.php"); 	?>	
	<!-- logo加banner加导航信息 -->
		
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="1" bgcolor="#66CCFF"></td>
  </tr>
</table>
<table width="780" height="283" border="0" align="center" cellpadding="0" cellspacing="0" class="whitebg">
  <tr>
    <td width="185" rowspan="4" valign="top">
	<table width="780" height="283" border="0" align="center" cellpadding="0" cellspacing="0" class="whitebg">
  <tr>
    <td width="185" rowspan="4" valign="top">
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="30" align="center" bgcolor="#0066CC" class="while_big"><?php echo $cnone ?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <?php 
		 while($row_qian1 = mysql_fetch_array($cn_qian1)){
		 ?>
        <tr>
          <td><a href="dtshow.php?id=<?php echo $row_qian1[id]; ?>&nname=<?php echo $ntwo; ?>" class="style1"  target="_blank"><?php echo substr_cut($row_qian1[title],18) ;?></a></td>
          <?php }?>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
    </table>
      
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="30" align="center" bgcolor="#0066CC" class="while_big"><?php echo $cntwo ?></td>
        </tr>
		<tr>
          <td>&nbsp;</td>
        </tr>
		<?php 
		for ($i=1;$i<13;$i++)
		{
		if($i<10)
		{
		$cerdate=$mmyear."0".$i;
		}else
		{
		$cerdate=$mmyear.$i;
		}
		?>
        <tr>
          <td height=23 class="style1" ><a href="rkshow.php?ttdate=<?php echo $cerdate ?>"><?php echo $mmyear."年".$i."月日况信息" ?></a> </td>
        
		<?php }?>
		</tr>
		<tr>
    		<td height="1" bgcolor="#33CCFF"></td>
 		 </tr>
		 <tr>
   			 <td height="23" class="style1" ><a href="show.php?name=120">所有年份日况信息……</a></td>  	
		</tr>
      </table>
    </td>
    <td width="2" rowspan="4" bgcolor="#00CCFF"></td>
    <td width="2" rowspan="4">&nbsp;</td>
    <td width="577" height="60" align="center" class="djs_head"><?php echo $cname; ?></td>
  </tr>
  <tr>
    <td height="1" bgcolor="#33CCFF"></td>
  </tr>
  <tr>
    <td height="12">&nbsp;
	</td>
  </tr>
  <tr>
    <td height="450" valign="top">
	<?php 
	//if(mysql_fetch_row($cn)>-1)
	//{
	?>
	<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr align="center" class="style1" >
  <?php 
  /* $mdate=explode("-",date("Y-m-d"));
	$year=$mdate[0];
	$month=$mdate[1];
	$day=$mdate[2];  */
  ?>
    <td>日&nbsp; 期</td>
	<td>运输收入</td>
	<td>发送箱</td>
    <td>到达箱</td>
    <td>装卸车量</td>
    <td>五定班列数</td>
    <td>待装车</td>
	<td>待卸车</td>
  </tr>
  <?php 
  while($row = mysql_fetch_array($cn)){
  //for ($i=0;$i<30;$i++)
	//{	

  ?>
  <tr align="center" class="style1" >
    <td><?php echo $row[title] ?></td>
    <td><?php echo $row[yssr] ?></td>
    <td><?php echo $row[fsjzx] ?></td>
    <td><?php echo $row[ddjzx] ?></td>
    <td><?php echo $row[hczxc] ?></td>
    <td><?php echo $row[wdblk] ?></td>
    <td><?php echo $row[dzc] ?></td>
    <td><?php echo $row[dxc] ?></td>
	<?php }?>
  </tr>
</table>

<?php //}
/* else
{
echo "当前还没有任何信息!!!";
} */
?>

	</td>
	
	
</table>
	
<?php include("include/bot.php");	?>
</body>
</html>
